package com.guigu.buy.mapper;

import com.guigu.buy.dto.OrderUtil;
import com.guigu.buy.dto.Order_Merchant;
import com.guigu.buy.pojo.Order;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.guigu.buy.vo.OrderVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author com.guigu
 * @since 2024-05-15
 */
public interface OrderMapper extends BaseMapper<Order> {

    List<OrderUtil> query(OrderVo vo);

    List<Order> selectByStatus(@Param("order") Order order);

    @Select("SELECT * FROM orders WHERE id = #{id}")
    Order getOrderById(Integer id);

    Order getMaxStockId();

    int queryMerchantId(int cid);

    List<Order_Merchant> list(OrderVo order);
}
